import * as TYPES from "../action-types";
import { Map } from "immutable";
let initState = Map({
  currentArea: 7,
  currentType: {
    name: "推荐歌手",
    type: 1,
  },
  artistList: [],
});
function artist(state = initState, action) {
  const { type, payload } = action;
  switch (type) {
    case TYPES.ART_CURRENT_AREA:
      return state.set("currentArea", payload);
    case TYPES.ART_CURRENT_TYPE:
      return state.set("currentType", payload);
    case TYPES.ART_CURRENT_LIST:
      return state.set("artistList", payload);

    default:
      return state;
  }
}

export default artist;
